from rest_framework import serializers

from .models import Stack, Fund, ConvBond


class StackSerializer(serializers.ModelSerializer):
    """
    通过obj.data访问序列化数据

    """

    class Meta:
        model = Stack
        fields = '__all__'


class ConvBondSerializer(serializers.ModelSerializer):
    """
    债券

    """

    class Meta:
        model = ConvBond
        fields = '__all__'



class FundSerializer(serializers.ModelSerializer):
    class Meta:
        model = Fund
        fields = '__all__'
